Dynamic Information Virtualization

ABSTRACT

A system and method for providing dynamic information virtualization (DIV) is disclosed. According to one embodiment, a device includes a dynamic optimization manager (DOM), a process and memory manager (PMM), a memory, and a host device driver. The device starts virtual functions after booting to allow a virtual machine (VM) running a guest operating system to identify the virtual functions and load virtual drivers of the virtual functions. The PMM allocates a unified cache from the memory to facilitate coherent access to information from storage and network resources by the VM. The host device driver enables a guess process in the VM to access the information stored in the unified cache in a secure and isolated manner.

CROSS REFERENCES

The present application claims the benefit of and priority to U.S.Provisional Patent Application Ser. No. 61/944,474 filed on Feb. 25,2014 and entitled “Dynamic Information Virtualization,” which is herebyincorporated by reference.

FIELD

The present disclosure relates in general to the field of computersoftware and systems, and in particular, to a system and method fordynamic information virtualization.

BACKGROUND

Information is at the heart of computer applications. Information refersto data emanating from various sources including storage devices, Webresources, application data, instant messages, emails, dynamic objects,etc. Enterprise information virtualization (EIV) allows applications touse information from a variety of sources. An EIV server evaluatesrequests for information from an information requestor, optimizes andsends queries for the requested information to individual data sources,and delivers and reports query results to the information requestor. TheEIV server may also run a custom application and publish the queryresults on a Web service.

Information can be of two types, non-addressable and addressable.Non-addressable information is transient or ephemeral information thatis alive for a short period of time. For example, information that flowsthrough a pipe or a socket is typically gone after the applicationconsumes the information. More importantly, non-addressable informationcannot be directly accessed by other applications, hence is termednon-addressable. Addressable information is persistent or perennialinformation that has a permanent source, location, and storage. Usingthe address given to the addressable information, such as a pathname, auniform resource identifier (URL), or a key (in the case of PCO),addressable information can be accessed by an application from anothercomputer provided the computer and the application have the connectivityand permission to access the information. Typical examples ofaddressable information are files and documents that are stored on harddisks, network attached storages, on Websites, dynamic objects (e.g.,PCOs), etc.

Coherency of information is important when caching information toachieve a good performance. Management of information coherency is inmany ways akin to cache coherency management in processors. Theunderlying coherency management for either information management orcache coherency management should account for the followings. First, theunit of coherency is pre-determined. The unit of coherency is usually ablock of a convenient size (e.g., one memory page). When multiplecomputers or applications cache the same information, the coherencyprotocol ensures that a block of information can at most be modified byone process or one computer at a time. Second, when a process (orcomputer) intends to write to a block, the process (or computer) firstacquires a lock, reads the latest version of the information block froma backing store, and notifies all other processes (or computers) toinvalidate the block from their caches. In cache coherency protocols,this process is referred to as read for ownership (RFO). An example ofcache coherency protocols is MESI protocol. As long as a process (orcomputer) holds a RFO lock on a block, the process (or computer) isallowed to write to the block (also referred to as dirty writes).Subsequently, when another process (or computer) requests to read thesame block, a cache manager requests the process (or computer) thatholds the RFO lock to flush the block to the backing store, and releasethe RFO lock. Then, the cache manager enables the requesting process toacquire the RFO lock, and cache the block of information for its use.

Hardware abstraction is usually implemented by virtual machines (VMs). Ahypervisor or a virtual machine manager (VMM) creates VMs on a hostcomputer after a guest operating system (OS) starts. The hardwareabstraction by the hypervisor or VMM enforces isolation among differentVMs. Traditionally, the hardware abstraction slows down virtual I/Ooperations. Although the physical hardware may have powerful componentssuch as a graphics processing unit (GPU) that is capable of hardwareacceleration for 3D graphics and animation, the VM may indicate to theguest OS that the hardware has only a VGA-capable graphics device.Resultantly, an application on the guest OS may to resort to softwarerendering instead of hardware acceleration that the GPU is capable ofdrawing and rotating a 3D object. Software rendering takes hundreds ofinstructions to complete a task that the GPU can complete in a handfulof instructions. In addition, the isolation by the hardware abstractionforces data to be copied across multiple hops while performing virtualI/O operations.

SUMMARY

A system and method for providing dynamic information virtualization(DIV) is disclosed. According to one embodiment, a device includes adynamic optimization manager (DOM), a process and memory manager (PMM),a memory, and a host device driver. The device starts virtual functionsafter booting to allow a virtual machine (VM) running a guest operatingsystem to identify the virtual functions and load virtual drivers of thevirtual functions. The PMM allocates a unified cache from the memory tofacilitate coherent access to information from storage and networkresources by the VM. The host device driver enables a guess process inthe VM to access the information stored in the unified cache in a secureand isolated manner.

The above and other preferred features, including various novel detailsof implementation and combination of elements, will now be moreparticularly described with reference to the accompanying drawings andpointed out in the claims. It will be understood that the particularmethods and apparatuses are shown by way of illustration only and not aslimitations. As will be understood by those skilled in the art, theprinciples and features explained herein may be employed in various andnumerous embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying figures, which are included as part of the presentspecification, illustrate the various embodiments of the presentlydisclosed system and method and together with the general descriptiongiven above and the detailed description of the embodiments given belowserve to explain and teach the principles of the present system andmethod.

FIG. 1 illustrates a dynamic optimization manager (DOM) in the contextof an exemplary DIOV device that is implemented as a hardware device,according to one embodiment;

FIG. 2 illustrates a DOM in the context of an exemplary DIOV deviceemulated in software in a hypervisor or a host operating system,according to one embodiment;

FIG. 3 illustrates the roles of DOM and PMM in the management of memoryused by DOM optimizations, according to one embodiment;

FIG. 4A illustrates system architecture of a classical virtualization,according to one embodiment;

FIG. 4B illustrates system architecture of DIV, according to oneembodiment;

FIG. 5 illustrates exemplary secure portals implemented by DIV,according to one embodiment;

FIG. 6 illustrates DOM optimizations for DIV, according to oneembodiment;

FIG. 7 illustrates an exemplary distributed storage service in avirtualized environment, according to one embodiment;

FIG. 8 illustrates an exemplary distributed storage service in a nativeenvironment, according to one embodiment.

FIG. 9 illustrates an exemplary unified information cache in avirtualized environment, according to one embodiment;

FIG. 10 illustrates an exemplary unified information cache in a nativeenvironment, according to one embodiment; and

FIG. 11 illustrates exemplary taxonomy of virtualization, according toone embodiment.

While the present disclosure is subject to various modifications andalternative forms, specific embodiments thereof have been shown by wayof example in the drawings and will herein be described in detail. Thepresent disclosure should be understood to not be limited to theparticular forms disclosed, but on the contrary, the intention is tocover all modifications, equivalents, and alternatives falling withinthe spirit and scope of the present disclosure.

DETAILED DESCRIPTION

Dynamic device virtualization (DDV) is a software device virtualizationtechnique. Hardware devices (e.g., a graphics processing unit (GPU), astorage device, a network interface card (NIC)) are concurrentlyaccessed from multiple guest operating systems (OS) with full hardwareaccelerations supported by their native driver of a computer system. DDVenhances scalability and utilization of hardware device withoutrequiring special hardware optimization such as single root I/Ovirtualization (SR-IOV) from PCI special interest group (SIG). A devicemanager of DDV runs on a supervisory software layer, observes thebehavior of a native device driver loaded on the host, and dynamicallyclones virtual device drivers to run in the guest OS context. DDVenhances the input/output (I/O) performance of processes andapplications running on virtual machines. The dynamically cloneddevice-specific virtual device drivers for virtual machines performzero-copy (direct) I/O in the execution context of the guest processes,by directly accessing the guest user memory from the host kernel basedon various address space virtualization techniques (e.g., hybrid addressspace, kernel address space partitioning, and dynamic translation).

Dynamic I/O virtualization (DIOV) is a device model for I/Ovirtualization. While DDV aims at virtualizing each hardware I/O device,DIOV aims at elevating I/O virtualization to higher abstractions: directrendering manager (DRM) instead of graphics processing units (GPUs),file systems instead of storage devices (e.g., hard disks, networkattached storage (NAS)), and socket protocols instead of networkinterface cards (NICs). A DIOV device can be realized using anycombination of hardware/software components or can be fully emulated insoftware that is typically inside a hypervisor. The DIOV device driverpresents itself to the guest operating systems as a combination of (a) aprocess and memory manager (PMM), (b) a file system driver, (c) a socketprotocol driver, and (d) a DRM driver. DIOV is embodied in a set ofmemory optimizations (e.g., shared storage caching, shared heap). ThePMM pre-allocates and manages physical memory (DIOV memory) needed forDIOV memory optimizations, unbeknownst to the hypervisor and guest andhost operating systems. Dynamic execution contexts (DEC) enablesefficient split-context, polling based, asynchronous remote system callarchitecture, using shared memory communication infrastructure calledstreams. Enhanced hybrid address space (EHAS) enables sharing of pagemappings between the host and guest execution contexts such that theguest context can access the DIOV memory, and the host context canaccess the guest user memory.

The present disclosure describes dynamic information virtualization(DIV) of a computer system. DIV is an evolution of dynamic devicevirtualization (DDV) and dynamic I/O virtualization (DIOV). Dynamicdevice virtualization (DDV) is disclosed in a co-pending U.S. patentapplication Ser. No. 14/133,396, and dynamic I/O virtualization (DIOV)is disclosed in a co-pending U.S. patent application Ser. No.14/555,473. The present disclosure, Dynamic Information Virtualization,extends DIOV to have a dynamic optimization manager (DOM) and implementdynamic optimizations.

In dynamic translation, memory virtualization is used to ensure thatpage tables for guest processes are appropriately modified to work inthe presence of virtualization. This is agnostic to the behavior of theguest processes. DIV builds a deep awareness of guest processes into thehypervisor (and DIOV host) and performs true process-level I/Ovirtualization; DIV tracks information (from storage files, networkresources, persistent coherent objects, etc.) managed by a guestprocess, and securely isolates information accessed by each guestprocess. Accordingly, one guest process never sees information accessedby another guest process unless that information is explicitly shared.

The DOM provides a management infrastructure for DIOV memoryoptimizations providing three major functions: (a) process-level I/Ovirtualization, (b) process-level memory management, and (c)process-level security management. DIV provides seamless acceleration ofcoherent accesses to various types of information including, but notlimited to, documents residing in a storage device, and Web resourcesaccessible from intranet and the Internet.

The present disclosure introduces a new type of object, herein referredto as a persistent coherent object (PCO). DIV coherently manages thepersistent coherent object that blends the persistence of cloud storagearchitectures like Amazon S3 and the coherency of software in-memorycaching solutions like Memcached, and helps a dynamic process (e.g., adynamic Web page) to maintain stateful information in a memory.

Some I/O virtualization techniques tried to bypass the hardwarevirtualization (e.g., paravirtualization), while others tried to makevirtualized hardware closer to native hardware devices (e.g., directdevice assignment using Intel VT-d and AMD IOMMU, and single root I/Ovirtualization (SR-IOV)). In contrast, DIV provides hardware abstractionthat is faster and more efficient than real hardware devices on aphysical computer.

Multi-tenant environment generally refers to a public cloud environmentwhere multiple and possibly rivalling parties may share virtual machineson the same physical computer. It is of a great concern how informationis safely shared among the multiple parties because one party can snoopinto intellectual property or other valuable information that belongs toother parties. The present disclosure implements a secure portal throughwhich each process can access the shared information. Thus, not onlyvirtual machines, but also processes in the virtual machines arefirewalled from seeing each other's memory or other resources on aphysical computer.

Distributed File Systems (DFS) and Cluster File System (CFS) arefamilies of file system architectures that effectively share storagedevices (mount points) across multiple computers (physical or virtualmachines). Examples of Network File System (NFS) include Cassandra andHadoop Distributed File System (HDFS). DFS/CFS architectures areextremely constrained with performance optimizations such as cachingbecause the contents of the file (data) and file system (metadata) canbe changed asynchronously by any client that has mounted the filesystem. The DIV FS Service presented in the present disclosure is aDistributed File System architecture that permits efficient coherentread and write caching of both data as well as metadata.

Network file system (NFS) is at the heart of many file servers and iscommonly referred to as network-attached storage (NAS). A NAS server mayhave multiple exported mount points that can be NFS mounted on otherphysical or virtual computers. The earlier versions of NFS (e.g., v2 andv3) are stateless and do not ensure coherent caching across multiplemount points. NFS v4 and parallel NFS (pNFS) provide read-only caching,mostly-read caching, and single writer caching. DIV provides acoherence-aware protocol that permits multiple writer caching on NFSexported mount points, as well as it does with other storagearchitectures.

DIV prevents NFS promiscuous mounts to implement coherent and unifiedcaching. In other words, DIV prevents the same NFS mount point frombeing mounted at multiple physical or virtual computers, and exportsonly a single DIV mount point as a DIV device. DIV does not allowsymbolic links in one NFS exported mount point to a pathname insideanother NFS exported mount point.

Deduplication identifies identical copies of blocks or pages in astorage device, and ensures that only one copy of the blocks or pages isstored in the storage device. Deduplication is useful in many scenarios,for example, in a storage backup where pages that have changedincrementally are de-duplicated to reduce the volume of the backupstorage drastically. DIV may not perform deduplication explicitly.Instead, unified caching implemented by DIV keeps only one copy of afile block or page in a memory even when multiple processes acrossmultiple guest operating systems open the same file.

Storage caching and network caching have matured independently. Commonlyaccessed information on storage and network locations is cached in amemory or other disk devices (e.g., solid-state disks) to reduce thelatency to access the information. Caching information in a coherentmanner is a challenging task. The present disclosure describes adistributed unified information cache (DUIC) for storing cachinginformation and network resources transparently and seamlessly using thesame infrastructure. The DUIC can also transparently cache informationfrom other sources, like persistent coherent objects (PCO) that isintroduced for improved efficiency of dynamic programming paradigms.

Conventional generational caching refers to a coherency architectureimplemented in many Web-caching processes. Generational cachingmaintains a generation value for each type of objects. Each time anobject is updated, its associated generation value is incremented. In apost example, any time someone updates a post object, the postgeneration object is incremented. Any time a grouped object is read orwritten in the cache, the generation value is included in a key. If thegeneration value of the key mismatches, there is no potential ofreferring to cached stale objects.

The term generational caching used in the present disclosure isdifferent from the conventional generational caching. Based on the ageof a block in the cache (or page of a file, a Web resource or apersistent coherent object), the block is promoted between three pools:nursery, aging, and tenured. This terminology of aging can also be foundin the subject of generational garbage collection in compilers andruntimes for object-oriented languages. However, it is noted that theDUIC generational caching mechanism disclosed herein has little incommon with the conventional generational caching, or the generationalgarbage collection except the terminology of aging is shared.

In traditional operating systems, system calls are synchronous trapsinto an operating system to perform some privileged tasks such asoperating on an I/O device. Similarly, a hypercall is a synchronous trapfrom a guest operating system to a hypervisor (or virtual machinemonitor) to perform supervisory chores. According to one embodiment, thepresent disclosure introduces a new type of trap herein referred to as ahostcall for a guest operating system to communicate with a hostoperating system. In the case of a hosted hypervisor (e.g., a type 2hypervisor), the hypervisor and the host operating system are consideredto be the same entity, and a hostcall is synonymous to a hypercall.

In storage caching, as in the case of operating system page caching,each page cached in memory is backed by a file in a storage device(called the “backing file” and the “backing storage device” or simply“backing store”). The DUIC handles information such as Web resources(i.e., resources downloaded from the intranet and the Internet) andpersistent coherent objects that may not have a storage associated withthem. If a cache block containing such information is invalidated, theinformation is normally lost, and the information needs to be fetchedfrom the Web resources or recreated in another way. According to oneembodiment, the present system provides a backing store for all types ofinformation. For example, a storage device (or a portion thereof) isassigned to temporarily store transient objects until they areinvalidated.

During a writeback, a cache synchronizes the information of a cacheddirty block (a block that has been modified in the cache) on to thebacking store. Typically, writeback occurs only when a cache block isevicted. In the case of a DIOV active writeback, a separate thread onthe host actively cleans the cache by proactively finding dirty cacheblocks and writing the dirty cache blocks back to the backing store.Dirty blocks are a performance inhibitor especially in view of read forownership (RFO) from other DUIC nodes. Clean blocks can be freely sharedwith other DUIC nodes.

When a cache manager runs out of free cache blocks, the cache managerevicts blocks, writes the evicted blocks back to the backing store, andreuse the freed blocks. This process is referred to as reclamation.Since reclamation is an expensive process and typically involvescomplicated analysis, for example, processing profile feedback andspeculations (similar to block access predictions), a bunch of blocks(e.g., 10% of all blocks) may be reclaimed each time reclamation isperformed.

The x86 architectures use a hardware page walking mechanism fortranslating virtual addresses (also referred to as linear addresses) tophysical addresses using four-level page tables, PML4 (level 4), a pagedirectory pointer (PDP) (level 3), a page directory (PD) (level 2), anda page table (PT) (level 1). The base address of the root of the pagingstructures in a register is referred to as CR3. In the 64-bitarchitecture, CR3 points to a single 4KB page PML4. The PML4 pageincludes 512 entries, and each of the 512 entries points to a PDP. EachPDP includes 512 entries, and each of the 512 entries points to either a1 GB page or a PD. Each PD includes 512 entries, each of the 512 entriespoints to either a 2 MB page or a PT. Each PT includes 512 entries, andeach of the 512 entries points to a 4KB page.

Hardware virtual machine (HVM) architectures (e.g., Intel VT, AMD-V) usenested page tables. Examples of HVM include, but are not limited to,Intel's extended page table (EPT), and AMD's rapid virtual indexing(RVI) or nested page table (NPT). The EPT and RVI/NPT have the samearchitecture as the four-level page tables. Every virtual addresstranslation emanating inside a guest operating system goes through twosteps of translation. The first translation step uses the guest's pagetable to translate from a guest virtual address (GVA) to a guestphysical address (GPA). The second translation step uses the EPT orRVI/NPT to translate from the guest physical address (GPA) to a hostphysical address (HPA) that is the same as the physical address on thehost computer.

According to one embodiment, a process and memory manager (PMM) buildspage table segments both in the guest page table as well as in theEPT/RVI to map relevant portions of the DIOV memory into the guestprocess address space. Each of the levels of the x86 (e.g., Intel andAMD) page tables mentioned above have two bits including an accessed (A)bit and a dirty (D) bit. These bits can be reset by the system software(e.g., an operating system, a hypervisor). When a memory page isaccessed for reading, writing, or execution, the accessed (A) bit in thepage tables is set by the hardware. When a page is written to, the dirty(D) bit is set.

The system software periodically scans through the A/D bits of the pagescorresponding to the DUIC cache block to determine accessed or writtenpages. This harvesting mechanism may be used to increment a referencecount for the cache blocks. The reference count can be used by a cachereclamation process to decide whether a block is a good candidate toevict or not. Typically, a block that has a high reference countindicates that it might be referenced again in the near future.Reclamation process would spare such blocks with a high reference countduring its selection process.

Memcached is a distributed associative array used by dynamic Web pagesto store objects as key-value pairs. Memcached assumes that keys aretransient and not intended to be persisted. Memcached is typically usedto cache results of hot database queries that are not required to bealive for long. Memcached uses a least recently used (LRU) cachingprocess to evict objects when the cache is full.

Amazon simple storage service (S3) is a storage service for the Internetand is designed to make Web-scale computing easier for developers.Amazon S3 provides a simple Web-based interface that can be used tostore and retrieve any amount of data, at any time, from anywhere on theInternet. Amazon S3 allows developers to access to the same highlyscalable, reliable, secure, fast, inexpensive infrastructure to run aglobal network of Websites. Amazon S3 service aims to maximize benefitsof scalability and passes the benefits to the developers. The presentdisclosure introduces a new type of object architecture called“Persistent Coherent Objects” (PCO) which blends the persistence ofAmazon S3 with the coherency of Memcached.

Dynamic optimization manager (DOM) is a management framework for DIOVmemory optimizations. Hypervisors typically are not process-aware andsimply deal with virtual CPUs on which guest operating systems scheduleprocesses. However, the optimizations in the DIOV framework need to knowabout the entity that the guest operating system calls a process. Aprocess is marked with a common address space shared among multipleexecuting threads. The shared address space is usually a single pagetable that is shared across of different constituent threads. Thecredential of a process is shared among threads to access variousresources. For example, if one thread of a process has a permission toopen and read/write a file, other threads of the same process also sharethe same permission.

Dynamic optimizations managed by the DOM fall under the purview of DIOVmemory optimizations that rely on dynamic properties in a runtimeenvironment. DOM optimizations are designed to work on a dynamic memoryload, or a fluctuating size of a memory. The DOM optimizations remaincoherent when a portion of the memory is added or freed. The datastructures and processes implemented by DOM work in a modular chunk ofthe DIOV memory that can be added or detached at will, as opposed tospreading information throughout the DIOV memory and making theinformation an indivisible or inseparable blob that can only bereconfigured by saving to a disk and restoring into a reconfiguredconfiguration. The DOM optimizations facilitate only the relevantportions of a DIOV memory to be mapped into the address space of eachprocess, and ensures heightened security.

According to one embodiment, the DOM dynamically tracks activities ofvarious DIOV dynamic optimizations. For optimizations that aremomentarily more active and experience a higher memory demand, the DOMtemporarily assigns portions of the memory that are currently allocatedto DOM optimizations that are less active. The assigned portions of thememory are transparently and automatically reclaimed by the DOM afterthe burst of activities is over. The DOM optimizations efficiently dealwith dynamic “hot plug” and “hot unplug” of memory on demand.

DOM optimizations are built up of multi-tiered processes (e.g., rehashfunctions for a hash table) that are dynamically ranked based on dynamicworkload characterization. DOM optimizations use dynamic processes thatare fine-tuned (or specialized) based on dynamic (temporal) propertiesof the objects they operate on. Examples of dynamic properties include,but are not limited to, exclusivity of file accesses, dynamic profilefeedback, and speculation/prediction of resource access patterns. Thesedynamic properties are used to optimize unified caching in DIV. Anotherexample of dynamic properties is in the case of DIV FS Server where thecache manager identifies that two guest operating systems on twocomputers (e.g., DIV DUIC nodes) are thrashing the same cache blockrepeatedly. In this case, if the two guest operating systems can becollocated on the same physical computer, this thrashing can be avoided.DOM optimizations consume dynamic data structures similar to persistentcoherent objects in DIV.

The PMM pre-allocates a large pool of physical memory when a computerboots, and manages the allocated memory throughout the lifetime of DOMoptimizations. Each DOM optimization that registers with PMM requestsfor a specific number of blocks of memory. If available, the PMM grantsthe requested number of blocks. The DOM optimizations do not have toknow the physical addresses or physical locations of each of the memoryblocks granted by the PMM. The PMM refers to the entire chunk of memoryas a single entity, and addresses it with its own virtual address calledDOM virtual address (DVA) that ranges from 0 . . . N (virtual) blocks.The DOM optimizations (e.g., DIV) always operate at the DVA level. Whenthe DOM optimizations complete chores, the DOM optimizations may grantaccess to guest processes for appropriate blocks of memory. For example,for a process that requests a file to be opened, DIV may want to map thefile descriptor and data blocks corresponding to the file, in theaddress space of the process. At that time, the DOM optimizations (e.g.,DIV) call the PMM APIs to map the specific DVAs into the process'saddress space with specific access controls. The PMM translates the DVAof DOM to DOM physical address (DPA) and from DPA to the Host PhysicalAddress (HPA) or the physical address of the computer), and updates thepage tables of the process accordingly.

The memory blocks handled by the PMM can be of any size. According toone embodiment, the memory blocks are sized at 2 MB or 4KB to align withpage sizes supported by the x86 paging hardware. This gives theadvantage of using the protection bits on the page tables to restrictread, write, and execute permissions on a page by the system and userprocesses. The page-level protection plays an important role in ensuringstrong isolation across processes and across virtual machines.

Sometimes DOM and/or DOM optimizations may need to modify the mappingsof guest processes that are not running One instance is when PMM findsout that the hypervisor's memory is running dry, and PMM needs to yieldsa bunch of pre-allocated blocks back to the hypervisor (to its heap). Atthis time, PMM sends a request to all dynamic optimization managers tofree as much memory as possible. The DOM and DOM optimizations respondwith a list of DVAs and the set of processes from which they need to beunmapped from. All virtual CPUs of a guest process may need to besuspended when PMM remaps memory in the address space of its processes.

Each DOM optimization defines a set of PMM callbacks to respond tospecific requests from the PMM immediately. Examples of the PMMcallbacks include, but are not limited to, a request to “reclaim”,“flush” (prior to a shutdown or suspend), and “refresh” (immediatelyafter a wakeup, or a restart) the memory. These PMM callbacks give DOMoptimizations an opportunity to save and restore their statesappropriately for persistent dynamic optimizations. For example, DIVuses a persistent distributed unified information cache that is warmedup only after a significantly high volume of transactions over thousandsof files or Web resources, over a period of many hours, days, or weeks.A safe flush/refresh ensures that the warm cache blocks are preservedeven through a system suspend/resume, or shutdown/restart.

According to one embodiment, a DOM optimization is provided as a pair ofDIV drivers—a host DIV driver in a host operating system (orhypervisor), and a guest DIV driver in a guest operating system. TheseDIV drivers may be kernel modules, services, or applications. The DOMframework provides a mechanism for guest DIV drivers of a DOMoptimization to communicate with their host DIV drivers (and vice-versa)via a hostcall that is differentiated from a hypercall.

Classical taxonomy for virtualization identifies two types ofhypervisors—Type 1 hypervisor that is a baremetal hypervisor (e.g.,VMware ESX and Xen), and Type 2 hypervisor that is a hosted hypervisor(e.g., KVM or Bhyve) running as a kernel module in a host operatingsystem (e.g., Linux, Windows, or FreeBSD). There are two approaches forType 1 hypervisor depending on how they perform I/O operations. In Type1A (e.g., VMware), the hypervisor itself has all the device driversnecessary for controlling I/O devices, thus Type 1A hypervisorvirtualizes the CPU, memory, and I/O devices. In Type 1B hypervisor(e.g., Xen), the hypervisor manages the virtualization of CPU and memoryand delegates the handling of I/O devices to a supervisory guestoperating system (named Dom0 according to Xen terminology). DIOVintroduces a new type of virtualization, Type 3, where I/Ovirtualization happens in a DIOV device that may be implemented using acombination of hardware of software components. For example, DIOV devicemay be implemented as a PCIe card in hardware, or emulated in softwareinside the hypervisor or host operating system.

FIG. 11 illustrates exemplary taxonomy of virtualization, according toone embodiment. In Type 1A hypervisor (VMware), the computer hardware1100 and all devices therein are controlled by the hypervisor 1105. Thehypervisor creates the virtual machines 1111 through 1113 for runningguest operating systems. In Type 1B hypervisor (e.g., Xen), thehypervisor 1155 delegates the control of the hardware devices in 1150 toa supervisory guest operating system (DomD 1161). In Type 2 hypervisor(e.g., hosted—KVM/Bhyve), the host OS 1125 controls the hardware devicesin 1120, and runs hypervisors 1131 through 1133 as kernel modules, whichin turn create the virtual machines 1141 through 1143 in which the guestoperating systems are run. In Type 3 hypervisor (e.g., DIOV), a DIOVdevice 1170 that has its own host OS 1175 is responsible for I/Ovirtualization unbeknownst to the hypervisor 1185. The DIOV device 1170presents itself as a SR-IOV device with multiple virtual functions tothe hypervisor 1185 to allow the virtual machines 1191 through 1193 todirectly operate on these virtual functions.

The DIOV taxonomy brings the distinction between the host operatingsystem and the hypervisor. For the purpose of isolation, DIOV hostdrivers are implemented in the host operating system. In Type 1Ahypervisor 1105, the host OS and the hypervisor are one and thesame—however it would be apt to distinguish the DIOV module 1106 insidethe hypervisor as the host operating system. In Type 1B hypervisor 1155,the host operating system is a non-Dom0 but special domain or guestoperating system (called DomD 1162). In Type 2 hypervisors 1125, theDIOV module 1126 is a part of the host operating system per se. In Type3 hypervisor 1185, the host OS 1175 runs on the DIOV device 1170. TheDIOV device 1170 may be a separate hardware device such as a PCIe card,or a module in the hypervisor emulating the DIOV device. The traps orsupervisory control transfer from a guest operating system to a hostoperating system is called a hostcall (indicated by a dashed line inFIG. 11), and is differentiated from a hypercall that is a trap orsupervisory control transfer from the guest operating system to thehypervisor (indicated by the bold lines in FIG. 11).

In the case of Xen DIOV, the host operating system or DomD does not haveprivileges to modify the address space of the guest operating system.Therefore, a PMM driver in the guest operating system is used to managethe mapping of DIOV memory used by DOM optimizations. However, using theprocess-awareness feature built in the hypervisor via DIV, the PMM inthe hypervisor directly manages the process address spaces, and anadditional PMM driver in the guest operating system is no longernecessary.

DOM (and the DOM optimizations) exercises fine-grained control of whatresources (e.g., blocks of memory containing file descriptors, datablocks for a file) are visible to each process. According to oneembodiment, DOM provides process-level I/O virtualization, process-levelmemory management, and process-level security management.

The process-level I/O virtualization aims at recognizing and managingresources (files in storage devices, network resources, persistentcoherent objects) used by a process. Resources that are shareable withother processes will be efficiently shared. Resources that are privateto a process will be securely protected. . The process-level I/Ovirtualization can be implemented across multiple guest operatingsystems.

The process-level memory management aims to keeping track of memory usedby resources belonging to each process (e.g., blocks or pages of memorycorresponding to various data structures used by the DOM optimizations).When a process dies, the resources belonging to the process arereclaimed and made available to other processes.

The process-level security management aims at enforcing securitydecisions. The guest operating system and the host operating system areeventually responsible for making decisions about which resources can beused by which processes. For example, a guest operating system maydecide that a file may be opened by process A, but not by process B. TheDOM is responsible for enforcing the decision that process B cannotaccess any part for the file (e.g., file descriptors, data blocks,etc.). The process-level security management makes DOM and DOMoptimizations appropriate in a multi-tenant virtualization environment.The process-level security is managed exclusively by the hypervisor,completely agnostic of the guest operating system, in such a way thateven a rogue guest operating system will never be able to override theprocess level security policies enforced by the hypervisor.

The security and isolation required by the secure portal architecture isimplemented on top of these three pillars, i.e., process level I/Ovirtualization, process level memory management, and process levelsecurity management. DOM and DOM optimizations work as effectively in anative environment as in a virtualized environment. Once virtual drivers(or guest DIV drivers) for a DOM optimization are loaded on a nativesystem, the native system can benefit from the faster-than-native DOMoptimizations.

The PMM maintains two sets of master page table mappings. In the case ofx86 64-bit architecture, the master mappings correspond to page tableentries covering the entire range of DIOV memory. One set of mastermapping is for the host operating system, and the other set of mastermapping is for the guest operating systems. The PMM augments the pagetables of each guest process that performs I/O operations using the DIVframework, with appropriate page table entries from the master guestmapping. The guest page tables referred here may be the page tablescreated by the guest operating systems for the guest process, or theextended hybrid address space (EHAS) page table created by DIOV onbehalf of the guest process.

FIG. 1 illustrates a dynamic optimization manager (DOM) in the contextof an exemplary DIOV device that is implemented as a hardware device,according to one embodiment. In one embodiment, the hardware componentis a PCIe card. FIG. 1 particularly pertains to Type 3 virtualizationillustrated in FIG. 11. The DIOV device 121 includes a CPU 160, abuilt-in memory 162, and PCIe configuration spaces 163. Additionally,the DIOV device 121 may connect to hardware devices including, but notrestricted to, a graphics processing unit (GPU) 141, a storagedevices/controller 142, a network interface card (NIC) 143, andadditional external memory 180. The host OS running on the DIOV device121 includes (a) native device drivers for GPU 155, SATA 156, and NIC157, (b) native drivers for DRM 152, FS 153, and socket 154, (c) DOM 135and PMM 140, and (d) DIOV host drivers for DRM 132, FS 133, and socket134.

When the computer boots up, the host OS on DIOV device 121 boots upfirst. The PMM 140 formats the DIOV device 121, particularly toconfigure the memory 162 and 180 to be used for DOM optimizations. TheDOM 135 initializes itself and all DOM optimizations enabled on the DIOVdevice 121. Subsequently, the hypervisor 130 boots up. The DIOV device121 presents itself to the hypervisor 130 as a SR-IOV capable devicewith multiple virtual functions defined by the configuration spaces 163as configured by the host OS. The hypervisor 130 may be an off-the-shelfsoftware virtualization solution such as VMware ESX, Citrix XenServer,or Microsoft Hyper-V. The hypervisor 130 does not know the details ofthe SR-IOV device, but lets the user configure guest VMs 110 to directlyuse these virtual functions (one per VM) using the PCIe Passthroughtechnology.

Once the VMs 110 are booted, and the VMs 110 identify the virtualfunctions of the DIOV device 121 assigned to them (based on thevendor/device id of the virtual functions), and load the DIOV virtualdrivers including the main DIOV virtual driver 115, and DIOV virtualdrivers for DRM 116, FS 117, and Socket 118. These drivers establishdirect communication with the corresponding components in the host OS(DIOV host drivers for DRM 132, FS 133, and Socket 134) using one ofmany protocols including, but not restricted to, Streams.

When an application in the VM 110 performs an I/O operation, therequests are intercepted by the DIOV virtual drivers for DRM 116, FS117, or socket 118. For example, an application tries to open a file forreading. The request from the application comes primarily in the form ofa system call, and is intercepted by the DIOV virtual driver FS 117. TheDIOV virtual driver FS 117 relays this request to its DIOV host drivercounterpart FS 133. The file that is requested to be opened may alreadybe in cache managed by one of the DOM optimizations. If so, theappropriate memory blocks of data (DB) belonging to that file is mappedinto the current guest process address space by PMM 140, such thatfuture requests to read data from that file, can be resolved directly bythe DIOV virtual driver FS 117 from the cache. If the file is notcached, the DIOV host driver FS 133 passes on the request to theappropriate native FS driver 153 and then to the appropriate storagecontroller driver SATA 156 to perform the file I/O from the hardwarestorage device 142.

FIG. 2 illustrates a DOM in the context of an exemplary DIOV deviceemulated in software in a hypervisor or a host operating system,according to one embodiment. FIG. 2 particularly pertains to DIOV 1106of Type 1A virtualization (VMware) shown in FIG. 11. However, thisarchitecture is similar in the case of DIOV 1126 in Type 2virtualization (KVM/Bhyve) shown in FIG. 11, where the hypervisor is akernel module on the host operating system.

The computer hardware includes I/O devices including, but not restrictedto, GPU 241, Storage Controller 242, and NIC 243. The hypervisor 230boots on the computer system, and initializes the native drivers for GPU255, SATA 256, and NIC 257, and native drivers for DRM 252, FS 253, andSocket 254. The emulated DIOV device 221 is initialized in thehypervisor 230. The initialization starts with the loading of DIOV hostdrivers, DRM 232, FS 233, and Socket 234. The initialization of DIOVdevice 221 proceeds to load and start DOM 235, and PMM 240. During DIOVinitialization, a virtual SR-IOV is initialized with a finite number ofconfiguration spaces 263, and a large chunk of memory 262 and formatsthe memory 262 for use by DOM optimizations. The users are permitted todirectly assign virtual functions of the virtual DIOV device to the VMs210. The VMs 210 are then booted, and the behavior of the VMs 210 withrespect to performing I/O is identical to that described in FIG. 1.

FIG. 3 illustrates the roles of DOM and PMM in the management of memoryused by DOM optimizations, according to one embodiment. During theinitialization of DIOV device 221 (may be a physical device asillustrated in FIG. 1, or a virtual as illustrated in FIG. 2) PMM 240pre-allocates a large chunk of memory 262 and formats the memory 262 foruse by DOM optimizations for DRM 232, FS 233, and Socket 234. Each ofthese DOM optimizations 232-234 requests the DOM 235 for a specific sizeof memory. Based on availability, the DOM 235 apportions the memoryavailable for optimizations and gives a share to each of the DOMoptimizations. The DOM optimizations perform various chores such asimplementing storage/network caches, and shared heap, operating on thechunks of memory allotted to them based on DOM Virtual Address (DVA).When a DOM optimization has completed its chores (e.g., mapped a fileblock in storage cache), the DOM optimization calls DOM APIs tointegrate this memory into the address space of the guest process. TheDVA mappings provided by the

DOM optimizations are converted into DOM Physical Addresses (DPA) andhanded over to the PMM 240. The PMM 240 translates the DPA into HostPhysical Address (HPA—or machine physical address) before mapping thephysical memory pages into the guest process address space. In the eventof Intel VT's Extended Page Table (EPT) or AMD SVM's Nested Page Table(NPT), the DPA is translated into the appropriated Guest PhysicalAddress (GPA) before being mapped into the guest process address space.FIG. 6 illustrates the DOM optimization for DIV, according to oneembodiment. The DIV 650 in FIG. 6 provides the combined functionality ofthe DOM optimizations FS 233 and Socket 234 shown in FIG. 3.

DIV is a specific DOM optimization characterized by several uniquecharacteristics. The hardware abstraction of DIV defines a secure,faster-than-native, process-level information virtualization device. Theresulting abstract hardware (DIV device) is faster and more efficientthan the real hardware storage and networking devices on a physicalcomputer. Further, DIV provides a transparent and seamless mechanism forvirtualizing addressable information and managing the addressableinformation effectively across different computer nodes in a network, ina secure, faster-than-native manner. In particular, DIV seamlesslyoptimizes the access of information from storage and network sources,for example, documents in a storage device (e.g., a hard disk, anetwork-attached storage), Web resources on intranet and Internet. DIValso facilitates dynamic processes to create and consume persistentcoherent objects (PCOs) that are implemented as a distributedassociative array managed by a distributed service across a data centernetwork.

DIV provides faster-than-native access because of (a) memory mapping and(b) transparent deduplication and I/O reordering. DIV provides memorymapping whereby all information required by a process is always mappedin its “portal” memory. The unified cache manager supported by DIVautomatically (and transparently) performs deduplication and I/Oreordering to reduce the bottleneck on the storage and network hardwareinterfaces. Cached copies of information are shared among differentprocesses running on different virtual machines. Given a resource:offsetlocation in the memory, there is only a single block of memory holdingthat the information on a physical computer or a DUIC node, whicheffectively performs deduplication without DIOV having to expend timeand effort to explicitly perform deduplication. Further, informationdata is typically synched to the backing store only when a block isevicted from the cache, effectively achieving I/O reordering. The I/Oreordering reduces the bottleneck on the storage and network hardwareinterfaces, and gives preference to performance-critical operations suchas read for ownership (RFO).

According to one embodiment, DIV provides a “secure portal” for eachprocess to access information. The secure portal is a process's ownsecure view into the information world. Each portal can be viewed as aninfinitely large memory (arbitrarily wider than the physical and virtualmemory supported by computer hardware) that coherently maps informationthat each process requires to performs I/O operations. The secureportals for applications can access information from transparentlyvirtualized storage and network subsystems. The secure portals can beimplemented in both native and virtualized environments. One process isnot allowed to access the secure portal of another process. This processisolation is ensured by the process-level security management of DOM.The same information may be shared in the secure portals of multipleprocesses simultaneously. For example, if two processes are permitted toopen the same file, the memory blocks corresponding to the file (e.g.,file descriptor, data blocks) are mapped in the secure portals of boththe processes. The shared mappings are created and managed by DIV andthe processes are unaware of the shared mappings.

FIG. 4A and 4B illustrate the system architecture of DIV hardwareabstraction that enables faster than native I/O virtualization. FIG. 4Aillustrates system architecture of a classical I/O virtualization,according to one embodiment. The computer hardware includes I/O devicesincluding, but not restricted to, GPU 441, Storage Controller 442, andNIC 443. The hypervisor 430 enables concurrent and secure access fromeach of the guest operating systems 410 to these hardware I/O devices441-443. The security and isolation is enforced by a hardwareabstraction built by the hypervisor 430, which is popularly known asvirtual machines (VM) 420. The VMs 420 impose overheads on theconcurrent use of I/O devices by the guest operating systems, hence theresulting I/O throughput is considerably lower than that of a nativedevice per se. FIG. 4B illustrates system architecture of DIV, accordingto one embodiment. DIV replaces the classical hardware abstraction layerwith its own lightweight and efficient hardware abstraction enablingapplications in guest operating systems 411 to achieve significantlyhigher I/O throughput than what the native hardware devices themselvesare capable of providing. It is noted that in literature the termsvirtual machines, and guest operating systems are used interchangeably.In the forthcoming figures, the hardware abstraction is depicted as VMor DIV, whereas the guest operating systems running on the VMs aredepicted as such.

FIG. 5 illustrates exemplary secure portals implemented by DIV,according to one embodiment. The host OS 530 implements DIOV and DIV 560that is also the DIV host driver. The host OS 530 may directly (as inthe case of a Type 1A, Type 2 and Type 3 hypervisor in FIG. 11) orindirectly (as in Type AB hypervisor in FIG. 11) control the I/O devicesincluding and not restricted to GPU 541, Storage Controller 542, and NIC543. DIV 560 provides the hardware abstractions 555 on top of which theguest operating systems 510 boot and run. The DIV virtual driver 550 inthe guest operating systems directly communicates to the DIV host driver560 to perform storage and network I/O operations. The secure portals570 are private isolated viewports for guest applications to accessstorage and networking information served by DIV host driver 560. Aprocess can access information only through into secure portal, butcannot peek into or access information from secure portals belonging toanother process (in the same guest operating system or another).

According to one embodiment, DIV provides a distributed unifiedinformation cache (DUIC). DUIC is an extension of a DIOV storage cache.The DUIC caches information from multiple sources (e.g., documents fromstorage devices such as hard disks and network attached storage,resources from intranet and Internet, persistent coherent objects(PCOs)) transparently and seamlessly across the computers in a datacenter, using a distributed service to manage the coherency of cachedinformation. In one embodiment, the DUIC provides an integrated cachingarchitecture common to storage and network resources—the combination ofstorage and network caching into one architecture is a uniquecontribution made by the present invention. Applications such as Webservers and search engines can benefit from the intimate bonding betweenstorage and network caching in the DUIC. In the DUIC, a unit ofinformation is referred to as a resource. A resource can be of any typeof addressable information. Examples of a resource include, but are notlimited to, a file stored in a storage device, a Web resource(downloaded from the intranet or the Internet), or a persistent coherentobject (PCO).

DUIC provides a memory store for all resources accessed by runningprocesses (either on a native computer, or on guest operating systems)and also provides a backing store for information that do not naturallyhave a storage (e.g., Web resources downloaded from the Internet, PCOs).As in the case of DIOV storage cache, information cached in the DUIC aretransparently shared across multiple processes running on a hostoperating system or any guest operating systems. On the same server (aphysical computer), coherency is enforced by the coherency fabric of theshared memory architecture.

The DUIC reduces the volume of I/O that goes to a target (hardware)storage and network devices. The DUIC delivers significantly high I/Othroughput to the applications that use the information resources, whileoperating within the throughput/bandwidth limitations of the hardwareI/O devices.

The DUIC maintains several data structures. Some data structures arevisible to the guest (virtual) DIV driver while other data structuresare visible only to the host DIV driver. According to one embodiment,the data structures visible to the virtual DIV driver includemetadata-like resource descriptors (RD), resource block descriptors(RBD), and data blocks (DB). The DUIC data structures visible to thehost DIV driver include, but not limited to, a process table, a resourcetable, a resource block table, DOM optimization registry, memory mappingtables, and data structures used during reclamation and writebackphases.

The DUIC provides a generational caching (DUICGC) scheme to effectivelyoperate on a huge number of data blocks during active reclamation andwriteback phases. The DUICGC ensures that sparsely accessed blockssurrender unused sub blocks to ensure minimal wastage of memory.

According to one embodiment, the DUICGC can be applied to x86architecture using various stages of data block. Data blocks (DB) belongto resources in one of three pools: nursery, aging, and tenured. Everydata block starts in the nursery pool, and hot DBs progress through theaging pool and end up in the tenured pool. DUICGC profiles DBs todetermine their hotness in the DUIC. According to one embodiment, thehotness of a DB is determined by a reference count that is incrementedby the virtual DIV driver when a DB is accessed by a process, or theinformation is collected by harvesting the accessed/dirty bits on thex86 page tables. DBs are promoted to the aging and tenured pools whenthe DBs are scanned for the process of reclamation, or during activewriteback. For efficiency, the reclamation and active writeback phasesnormally operate only on DB's in the nursery. Once in a number of visits(e.g., 512 or 1024 visits), DUICGC scans through the entire aging andtenured pools to ensure that DBs are assigned to the right pools.

DUICGC also takes the responsibility to ensure that DBs that were oncehot, but not accessed anymore, are not locked in the aging and tenuredpools via a process referred to as cache rebalancing. The cacherebalancing may be implemented using reference counts from the guestprocesses or using counts harvested from the accessed/dirty bits off thex86 page tables. If using reference counts from guest processes, DUICGCkeeps track of the previous and current reference counts for each DB.If, during a visit, the reference counts are found to be the same,DUICGC determines that the DB has not been accessed since the last visit(or during the last interval). Both the previous and current referencecounts are decremented by the average reference count during the lastinterval. If using harvesting of accessed/dirty bits of x86 page tables,if a DB has not been marked accessed or dirty by the processor during aninterval, the reference count is decremented appropriately.

DUICGC provides effective management of the DB space. The effectivemanagement of the DB space is rendered difficult because (a) managementof page tables can be expensive, (b) the size of DBs shared acrossmultiple processes significantly impacts the cost of memory and analysisfor reclamation and writeback. If DIV were to manage DBs at smallersizes like 4 KB pages, there is less fragmentation (and more datadensity), but DOM needs more memory to manage the page tables acrossprocess. If DIV were to limit itself to larger page sizes (2 MB), fewerpages are needed to manage the page tables per process resulting in muchmore sparse data (and fragmentation and wasted memory space). DUICGCmanages the DB space in two ways. In the first method, DIV shares DBsacross processes at the same granularity as their allocation. DIVallocates 2 MB pages for DBs in the nursery. When hot DBs get promotedinto aging, the same DBs are broken down into 4KB pages—so the hotnessof DBs is tracked at a finer granularity. DBs that are cold getinstantly reclaimed and recycled. In the second method, DIV sharesvirtual DBs of a large size (2 MB) across processes (called partitions),but each partition is composed of 4KB pages that can be tracked forhotness independently, whereby cold pages can be instantly reclaimed andrecycled before the DBs progress into the aging pool.

The DUIC coherently operates on a single resource from multiple physicalcomputers. On a single physical computer (DUIC node), a DB uniquelyidentifies a unique resource:offset location. Across different DUICnodes, DUIC manages coherency of information stored in the DBs thatrefer to the same resource:offset location using a read for ownership(RFO) based DUIC cache coherency protocol described below.

Any number of DUIC nodes can simultaneous read a resource:offsetlocation. When one of the DUIC nodes needs to write to a particularresource:offset location, the DUIC node invalidates the DBs on otherDUIC nodes that correspond to that resource:offset location. Theinvalidation requires the last owner of the DB to flush the changes tothe backing store. The new writer reads the modified content of theresource:offset location either from the last writer's DB or from thebacking store. Once a DB acquires an RFO status, the DB can perform anynumber of dirty writes until another DUIC node reads or writes to thatresource:offset location. For Web resources that are downloaded fromintranet or Internet, DUIC nodes validate if the resource has changed onthe Web location. DUIC validates Web resources by either using a strictcoherency model where every access to the Web resource checks theheaders on the Web location (e.g., Linux curl-I command) or detectmodifications of the network resource using DIV cache coherency protocol(FRO) if the source machine is also a machine in the DIOV/DIV fabric, orusing a relaxed coherency model where a Web resource once accessed isassumed to be coherent for a grace period (e.g., 5-20 minutes).

DIV honors all contracts offered by the host and guest operatingsystems. Typically, in the presence of a software managed memory cache,all operations on a file opened for synchronous I/O or direct I/O arerequired to bypass the cache and directly go to the hardware devices.This is the default behavior of DIV. However, it is noted that in thecase of DIV devices, the hardware storage devices are tightly integratedwith the memory cache and exposed to the applications in the guests.Hence, in the case of DIV, to comply with the synchronous I/O and directI/O requirements, committing data to the memory cache should suffice.DIV guarantees that the data is appropriately written back to thebacking store at the right time. A user assertion is provided to enforcethe writeback semantics of the caches.

Storage virtualization of DIV is responsible for providing a seamlessinterface for integrating storage devices in the data center into asingle logical unit, and enabling every physical computer to access thesingle logical unit transparently. Distributed storage service avoidsthe overhead of a centralized maintenance of storage devices in a datacenter. Each mountable storage device (e.g., hard disk partitions, NFSmounts) is controlled by a dedicated service (e.g., DIV FS server). DIVFS servers are similar to NFS servers except that DIV FS servers areaware of the underlying coherency protocols governing the access ofinformation across different DUIC nodes. This enables DIV FS servers topermit write-caching even in a multiple writer scenario that NFS 4.0 orpNFS does not permit.

According to one embodiment, a DIV FS server exports direct attachedstorage (DAS) devices such as spindle hard disks, solid state disks tobe accessed by other physical computers.

A DIV FS server controls a single DIV device. A DIV device is anabstract entity created by the DIV FS server for managing a DAS device,or a NFS mount point. A DIV device can be mounted on a remote computersimilar to a NFS mount—either in a guest operating system running on thesame physical computer or in a remote physical computer, or in a guestoperating system running on a remote physical computer. NFS mounts onNAS devices are exported by a DIV FS service in the same way as DASdevices. The NFS mounts are first mounted on one of the physicalcomputers, and then the mount point is exported by DIV FS server on thatcomputer as a DIV device. A data center wide central registry ismaintained to ensure that the same NFS mount is not exported bydifferent physical computers. A DIV FS server is able to disambiguatealiases (e.g., NAS1:/x/y and NAS1:/x are the same mount) by requiringthe administrator to ensure that there are no promiscuous references(e.g., a symbolic link within a NFS mount referring to files or nodes inanother NFS mount). When DIV adds a symbolic link, DIV raises an errorif the symbolic link results in a promiscuous reference. An optionalcrawling service may be provided to crawl through NFS mounts to detect(a) if a NFS mount is mounted by DIOV and NFS simultaneously(potentially on different computers), and (b) if there are any aliasingsymbolic links. The crawling service may be run by the administratoronce in a while (e.g., when a new NFS node is added).

DIV FS servers maintain the coherency registry for all resources. Theread for ownership (RFO) attributes corresponding to all resource:offsetlocation can instantaneously be accessed from the coherency registry.The coherency registry removes a need to have a centralizeddata-center-wide coherency engine that can become the bottleneck forperformance.

Exclusivity of information resources is managed by DIV FS servers.Exclusive use of information resources significantly reduces thecoherency traffic between the DIV FS servers and the mount points of theDIV devices. If a DIV device is exclusively mounted (i.e., mounted onlyon a single physical or a virtual computer), all files in the DIV devicecan be exclusively accessed by DUIC operations on the DUIC node.Although a DIV device may be shared mounted (i.e., simultaneouslymounted on more than one physical or virtual computers), if a file isopened only by a single DUIC node, the file can be exclusively accessedby DUIC operations from the DUIC node.

Pathname resolution (or pathname lookup) is performance critical in DIV.Pathname resolution in DIV is particularly complicated because of thetransparent architecture of mount points, and symbolic links in manyoperating systems, and the combination of network and storagenamespaces. Thus, an operating system has to walk through each node(component) in the pathname, and verify that component directories andnodes exist, and that each component has access permission for the userattempting to access the resource. In the case of resources that requirefrequent pathname resolution (for example, small files that are openedin quick succession), the pathname resolution can become a bottleneck,especially on guest operating systems. DIV expedites the pathnameresolution using pathname caching, the coherent directory cache, and thecoherent name cache.

In one embodiment, DIV uses pathname caching for pathname resolution. Apathname that has been successfully opened is added to a cache. Aseparate table relates the cached pathname to the identifiers of eachcomponent of the pathname (e.g., Linux inodes corresponding to componentdirectories or nodes). Thus, if one of the component directories ornodes is modified (e.g., permissions), deleted, or renamed, the cachedpathname is invalidated. Pathname caching is useful both in the guestoperating system as well as the host operating system.

In another embodiment, DIV uses a coherent directory cache forexpediting pathname resolution. The DIV FS server maintains a coherentdirectory cache for DIV devices. The coherent directory cache is visibleto a guest operating system, and the guest operating system uses thecoherent directory cache to expedite the lookup and access validation ofeach component directories and nodes without making a hostcall tovalidate each pathname component. The coherent directory cache alsoprovides a rich set of attributes about the resource to accelerate manymore operations than just pathname resolution. Some examples aredirectly opening resources, accessing and modifying resource attributes,all happening directly from the guest operating system. In yet anotherembodiment, DIV uses a coherent name cache. The coherent name cache isused across multiple types of information including files in storagedevices, Web resources from intranet and Internet, and persistentcoherent objects (PCOs).

The performance of storage virtualization relies heavily upon theorganization of data and the storage devices that hold the data. Forstorage intensive systems and applications such as distributed databasemanagement systems (DBMs) and distributed search engines, sharedstorages are a significant bottleneck for performance because allaccesses have to be mediated through the same hardware controllers thatmay be overloaded. Traditionally, such systems and applications resortto replicate data across multiple storage units to divide the load onthe hardware controllers. DIV avoids the data replication and keeps justone copy of the data. Resultantly, DIV saves in storage space and datamanagement overheads to ensure coherency of data across multiplephysical devices such that every change is reflected in all replicatedcopies atomically.

According to one embodiment, DIV provides an infrastructure to supportpersistent coherent objects (PCOs) to be used by dynamic processes invarious domains (e.g., dynamic Web pages). The PCOs are implemented as adistributed associative array of key-value pairs, and managed by adistributed service across a data center network. As in the case of Webresources, DIV provides a backing store for a PCO that is persisted forany length of time until they are invalidated by DIV or the process thatgenerates the PCO.

According to one embodiment, DIV provides a coherent name cache on eachDUIC node. Each DUIC node expedites the lookup of an object by name(e.g., pathname for a document in a storage device, URL for a Webresource, a key for a PCO). The coherent name cache maps a name to theresource descriptor (RD) in the DUIC. Every name that is successfullyresolved (and accessed) on a DUIC node is cached in the coherent namecache. When a name no longer exists (e.g., when a file is deleted, or aWeb resource or a PCO is invalidated), its entry is removed from thecoherent name cache.

According to one embodiment, DIV provides transparent informationretrieval agnostic of the resource types (be they files in storagedevices, network resources in the internet or intranet, or persistentcoherent objects). During the information retrieval, the actualinformation virtualization occurs. Depending on the context in which theretrieval service is requested, and depending on the name (e.g., apathname, URL, a PCO key) and the type of information requested,information retrieval resorts to the services of the appropriate clientsto work with their servers (maybe on remote machines) to retrieve therequested information. Information retrieval is also responsible forassigning a backing store for information such as Web resources or PCOsat the time of creation.

FIG. 7 illustrates an exemplary distributed storage service in avirtualized environment, according to one embodiment. FIG. 8 illustratesan exemplary distributed storage service in a native environment,according to one embodiment. The descriptions are provided in thecontext of FIG. 7, but the explanation of FIG. 8 naturally follows fromthe description of FIG. 7. The host OS 730 may directly (as in the caseof a Type 1A, Type 2 and Type 3 hypervisor in FIG. 11) or indirectly (asin Type AB hypervisor in FIG. 11) control the I/O devices including andnot restricted to GPU 741, Storage Controller 742, and NIC 743. Aninternal hard disk attached to Storage Controller 742 and an externalNAS 744 are mounted on the host OS 730. The FS Server 1 762 a exportsthe mount point of the internal SATA hard disk on 742 as DIV globaldevice 10.0.0.3:/exp1, and the FS Server 2 762 b exports the mount pointfor the NAS 744 as DIV global device 10.0.0.3:/exp2. The FS Client 763 amounts the exported DIV global device 10.0.0.3:/exp1 as DIV local device10.0.0.3:/diov1. Similarly, the FS Client 763 b mounts the exported DIVglobal device 10.0.0.3:/exp2 as DIV local device 10.0.0.3:/diov2 and theFS Client 763 c mounts the exported DIV global device 10.0.0.3:/exp2 asDIV local device 10.0.0.4:/diov2. The mounted DIV local devices may bemounted on the guest operating system directories enabling guestprocesses to directly access the files and contents on these devices.The storage cache manager 861 and a part of DIV 859 are responsible formanaging the secure shared cache for the DIV storage subsystem.

FIG. 9 illustrates an exemplary unified information cache in avirtualized environment, according to one embodiment. FIG. 10illustrates an exemplary unified information cache in a nativeenvironment, according to one embodiment. FIGS. 9 and 10 extend FIGS. 7and 8 by (a) extending the cache manager to be a single unifiedinformation cache manager 961 that caters to information from alldomains (including by not restricted to storage, network, persistentcoherent objects or PCOs), (b) introducing the name cache 962 that isprimarily a metadata cache that facilitates quick lookup of pathnamesand unified resource locators (URLs) from the guest itself, (c) a commoninterface to information retrieval 963 that work with the specificclients for storage (FS client), network (Net client 972) and PCO (PCOclient 973) to retrieve information from their respective locations (onstorage devices, internet or intranet, or their backing device) ifinformation is not already available in memory. The NAS device 944additionally provides the backing store for the PCO client 972 topersist key-value pairs that are evicted from the unified informationcache.

The above example embodiments have been described herein above toillustrate various embodiments of implementing a system and method forproviding dynamic information virtualization. Various modifications anddepartures from the disclosed example embodiments will occur to thosehaving ordinary skill in the art. The subject matter that is intended tobe within the scope of the present disclosure is set forth in thefollowing claims.

I claim:
 1. A device for providing dynamic information virtualization(DIV) comprising: a dynamic optimization manager (DOM); a process andmemory manager (PMM); a memory; and a host device driver, wherein thedevice starts virtual functions after booting to allow a virtual machine(VM) running a guest operating system to identify the virtual functionsand load virtual drivers of the virtual functions, and wherein the PMMallocates a unified cache from the memory to facilitate coherent accessto information from storage and network resources by the VM, and whereinthe host device driver enables a guess process in the VM to access theinformation stored in the unified cache in a secure and isolated manner.2. The device of claim 1, wherein the device is a PCIe card insertedinto a PCIe slot of a host computer.
 3. The device of claim 1, whereinvirtual functions of the device are assigned to virtual machines of ahypervisor running on a host computer.
 4. The device of claim 1, whereinthe device is emulated in software of a hypervisor of a host computer.5. The device of claim 1, wherein the device provides informationvirtualization of one or more hardware devices including at least one ofa storage device, a networking device, and a graphics device.
 6. Thedevice of claim 5, wherein the virtual drivers comprise a file systemdriver, and a network protocol driver, and a direct rendering manager(DRM) driver.
 7. The device of claim 1, wherein each of the virtualdrivers establishes direct communication with a corresponding hostdevice driver in a host operating system via shared memory protocolsincluding streams.
 8. The device of claim 1, wherein the virtual driversof the VM intercepts a request from an application running on thevirtual machine and relays the request to the host device driver.
 9. Thedevice of claim 1, wherein the PMM determines that a file to access bythe request is stored in a cache and maps a memory block that belongs tothe file into a guest process address space.
 10. The device of claim 1,wherein a first application running on the guest operating systemaccesses information served by the host device driver through a secureportal, wherein the secure portal limits access to the informationallowed to the application by a second application.
 11. The device ofclaim 10, wherein the information is exchanged between the firstapplication and the host device driver via a hostcall.
 12. The device ofclaim 1, wherein the information is stored in a backing store.
 13. Thedevice of claim 1, wherein the PMM manages a generational caching of adistributed unified information cache (DUIC) for storing and managingdata blocks (DBs).
 14. The device of claim 14, wherein the DBs arestored in a nursery pool, an aging pool, and a tenured pool.
 15. Acomputer-implemented method comprising: starting virtual functions of adevice; allowing a virtual machine (VM) running a guest operating systemto identify the virtual functions and loads virtual drivers of thevirtual functions; allocating a unified cache from the memory tofacilitate coherent access to information from storage and networkresources by the VM; and enabling a guess process in the VM to accessthe information stored in the unified cache in a secure and isolatedmanner.
 16. The computer-implemented method of claim 15, wherein theinformation is available from one or more hardware devices connected tothe device.
 17. The computer-implemented method of claim 15, wherein theone or more hardware devices include a storage device, a networkingdevice, and a graphics device.
 18. The computer-implemented method ofclaim 15, wherein the virtual drivers comprise a file system driver, anda network protocol driver, and a direct rendering manager (DRM) driver.19. The computer-implemented method of claim 15, further comprisingallowing a first application running on the guest operating system toaccess the information served by a host device driver through a secureportal, and limiting a second application to access the information. 20.The computer-implemented method of claim 15, further comprising:intercepting a request from an application at the virtual drivers of theVM; and relaying the request to the host device driver.